---
title: "add to state array · RUAL Documentation"
description: "Adds given value to the array on the frontend and triggers updates based of it."
canonical: https://docs.rual.nl/block-types/state ui/state_add_to_state_array
language: en
---

# add to state array

This block is part of the [`state ui`](https://docs.rual.nl/block-types/state%20ui) group and was last modified in core [`v10.4.28`](https://docs.rual.nl/core-versions/100428).

### Type Selection Required

This block requires you to select the data type you want to work with. You must manually select the type using the type selector modal. To access the modal, click the white button on the block.

### Field Selection Required

This block requires field selection (in). You must manually select the fields you want to work with using the field selector modal. To access the modal, click the white button on the block.

Adds given value to the array on the frontend and triggers updates based of it.

- flow `flow`

- state key required `value` State key to update

- flow `flow`

A typical wiring for [add to state array](https://docs.rual.nl/block-types/state%20ui/state_add_to_state_array): a [function trigger](https://docs.rual.nl/block-types/globals/trigger_custom_function) starts the flow; [value](https://docs.rual.nl/block-types/value/value_default) feeds the `key` pin; the `flow` out pin feeds [debug](https://docs.rual.nl/block-types/state%20ui/state_debug).

![Studio canvas example for the add to state array block: typical wiring for add to state array.](https://docs.rual.nl/canvas-examples/state_add_to_state_array.png)

### Version history

Introduced in [`v10.4.28`](https://docs.rual.nl/core-versions/100428).
